class MyDecorator:  
    def __init__(self, func):  
        self.func = func  
  
    def __call__(self, *args, **kwargs):  
        print("函数执行前")  
        result = self.func(*args, **kwargs)  
        print("函数执行后")   
        return result  
  
@MyDecorator  
def say_hello(name):  
    print(f"Hello, {name}!!!")  
say_hello("ZhangSan")